<include file='Common:header' />

<!-- /section:basics/navbar.layout -->
<div class="main-container" id="main-container">
    <!-- #section:basics/sidebar -->
    <include file='Common:left' />
    <!-- /section:basics/sidebar -->
    <div class="main-content">
        <div class="main-content-inner">
            <div class="page-content">
                <!--主题-->
                <div class="page-header">
                    <h1>
                        您当前操作
                        <small>
                            <i class="ace-icon fa fa-angle-double-right"></i>
                            添加土地类型
                        </small>
                    </h1>
                </div>
                <script>
                    function checkForm() {
                        if ('' == $.trim($('#landclass_name').val())) {
                            $('#resone').attr("class", "middle highmsg");//ID为resone 重新class赋值
                            $('#resone').html('土地类型名不能为空').show();//id为resone 赋值html值
                            $('#landclass_name').focus();
                            return false;
                        }
                        if ($("#display").is(':checked')) {
                            $("#display").val('1');
                        } else {
                            $("#display").val('0');
                        }
                    }
                </script>
                <div class="row">
                    <div class="col-xs-12">
                        <form class="form-horizontal" name="land_class_add" id="land_class_add" method="post" onsubmit="return checkForm();" action="__URL__/land_class_add">
                            <div class="form-group">
                                <label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 土地类型名：  </label>
                                <div class="col-sm-10">
                                    <input type="text" name="landclass_name" id="landclass_name" placeholder="输入农作物名" class="col-xs-10 col-sm-4" />
                                    <span class="middle" id="resone"></span>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 升级条件：  </label>

                                <div class="col-sm-10">
                                    <input type="text" name="landclass_upgrade" id="landclass_upgrade" placeholder="农作物id:数量;农作物id:数量" class="col-xs-10 col-sm-4" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 可生产农作物：  </label>
                                <div class="col-sm-10">
                                    <input type="text" name="landclass_crops" id="landclass_crops" placeholder="农作物id，农作物id" class="col-xs-10 col-sm-4" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 土地图片：  </label>
                                <div id="uploader-demo" class="webuploader_col">
                                    <!--用来存放item-->
                                    <div id="fileList" class="uploader-list"></div>
                                    <input type="hidden" value="{:U('land/upimage')}" id='webuploader_server'/>
                                    <input type="hidden" value="" id="uploader_file" name="uploader_file"/>
                                    <div id="filePicker">选择图片</div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 是否启用： </label>
                                <div class="col-sm-10" style="padding-top:5px;">
                                    <input name="display" id="display" value="1" class="ace ace-switch ace-switch-4 btn-flat" checked type="checkbox" />
                                    <span class="lbl">&nbsp;&nbsp;</span>
                                </div>
                            </div>
                            <div style='text-align: center;'>
                                <button class="btn btn-info" type="submit">
                                    <i class="ace-icon fa fa-check bigger-110"></i>
                                    保存
                                </button>

                                &nbsp; &nbsp; &nbsp;
                                <button class="btn" onclick="history.go(-1);">
                                    <i class="ace-icon fa fa-undo bigger-110"></i>
                                    返回
                                </button>
                            </div>
                        </form>
                    </div>
                </div>
                <div class="hr hr-24"></div>

                <include file='Common:header_nav' />

            </div><!-- /.page-content -->
        </div>
    </div><!-- /.main-content -->

    <include file='Common:footer' />

</div><!-- /.main-container -->

<!--下拉样式以及JS-->
<link rel="stylesheet" href="__PUBLIC__/assets/css/chosen.css" />
<script src="__PUBLIC__/assets/js/chosen.jquery.js"></script>
<!-- inline scripts related to this page -->
</body>
</html>
